package com.dong.sqltoy.model;

import org.sagacity.sqltoy.config.annotation.Column;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;
import org.sagacity.sqltoy.config.annotation.Tenant;

import java.io.Serial;

@Entity(tableName = "user")
public class User implements java.io.Serializable
{
    @Serial
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "id")
    private String id;
    @Column(name = "name")
    private String name;
    @Tenant(field = "tenant_id")
    @Column(name = "tenant_id")
    private String tenantId;
    @Column(name = "age")
    private Integer age;
    @Column(name = "creator")
    private String creator;
    @Column(name = "updater")
    private String updater;

    public User()
    {
    }

    public User(String id, String name, String tenantId, Integer age)
    {
        this.id = id;
        this.name = name;
        this.tenantId = tenantId;
        this.age = age;
    }

    public User(String id, String name, String tenantId, Integer age, String creator, String updater)
    {
        this.id = id;
        this.name = name;
        this.tenantId = tenantId;
        this.age = age;
        this.creator = creator;
        this.updater = updater;
    }

    // Getters and Setters
    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getTenantId()
    {
        return tenantId;
    }

    public void setTenantId(String tenantId)
    {
        this.tenantId = tenantId;
    }

    public Integer getAge()
    {
        return age;
    }

    public void setAge(Integer age)
    {
        this.age = age;
    }

    public String getCreator()
    {
        return creator;
    }

    public void setCreator(String creator)
    {
        this.creator = creator;
    }

    public String getUpdater()
    {
        return updater;
    }

    public void setUpdater(String updater)
    {
        this.updater = updater;
    }
}